package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArticleController {

    //使用占位符 {}
    //@PathVariable注解的value属性写占位符的key
    @RequestMapping("{username}/article/details/{id}")
    public BaseRespVo articleDetails(@PathVariable("username") String usernamex,
                                     @PathVariable("id") String idy) {
        return BaseRespVo.ok();
    }

    @RequestMapping("user/{id}")
    public BaseRespVo user(@PathVariable("id") Integer id) {
        return BaseRespVo.ok();
    }
}
